﻿ declare @t table (val int)
declare @i int
set @i = 1
while @i<=100000
begin
	insert @t values (rand() * 100 + 1)
	set @i = @i+1
end

select count(*), val 
from @t
group by val


update accion set ganador =0 where ganador = 1
update Sorteo set Ejecutado =0 where ejecutado = 1